/*
 * Copyright 2001-2014 Viewstreet Technologies www.viewstreet.com.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.viewstreet.beanspice;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * The Annotation SpiceMethod. Used to denote BeanSpiceProcessing required.
 * Use the BeanSpiceProcessor to alter auto-generated source files from any code generator
 * EG: JAXB, Google's protobuf code generator. 
 * The BeanSpiceProcessor is available as a maven plug-in  
 * 	
 * <pre>
 * {@code
 *  <groupId>com.viewstreet</groupId>
 *  <artifactId>beanspice</artifactId>
 * }
 * </pre>
 *
 * Apply this annotation to a method that will be delegated to by the first 
 * parameter on the method. the first Parameter (the host) must be a type that you have the 
 * source for. The BeanSpiceProcessor will alter host source to include a call to your method.
 * EG:
 *<pre>
 *{@code
 *  public class SpiceBean {	
 *     @com.viewstreet.beanspice.SpiceMethod
 *     public String toString(TestBean theBean, Date theDate)	{
 *        return theBean.toString() + " Some Stuff "+ theDate;
 *     }
 *  }
 *}
 *</pre>
 *	After BeanSpiceProcessor is run it will alter the host TestBean.java as follows
 *
 *<pre>
 *{@code
 *  public class TestBean {
 *    //
 *    // This is a BeanSpice Method : it is delegated to com.viewstreet.beanspice.test.SpiceBean.toString(com.viewstreet.beanspice.test.TestBean,java.util.Date)
 *    // 
 *    public java.lang.String toString(java.util.Date theDate) {
 *      return m_com_viewstreet_beanspice_test_SpiceBean.toString(this, theDate);
 *    }
 *    //
 *    // BeanSpice property used for method delegation
 *    //
 *    protected transient com.viewstreet.beanspice.test.SpiceBean m_com_viewstreet_beanspice_test_SpiceBean = new com.viewstreet.beanspice.test.SpiceBean();
 *  }
 *}
 *</pre>
 *	
 */

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD) 
public @interface SpiceMethod {
	
}
